package com.rt.cms.common.enums;

/**
 * Create with IDEA
 *
 * @author Wangzs
 * @Description
 * @Date 2018/6/15
 * @Time 17:04
 */
public enum OperationType {

    Add(1, "1", "新增"),
    Modify(2, "2", "修改"),
    Agree_Of_Department(3, "3", "部门同意"),
    Refuse_Of_Department(4, "4", "部门拒绝"),
    Agree_Of_Wind(5, "5", "风控同意"),
    Refuse_Of_Wind(6, "6", "风控拒绝"),
    InFile(7, "7", "存档"),
    OutFile(8, "8", "取消存档"),
    InDormancy(9, "9", "休眠"),
    OutDormancy(10, "10", "取消休眠"),
    upLoadReport(11, "11", "上传尽调报告"),
    AgreeInDormancy(12, "12", "休眠同意"),
    AgreeOutDormancy(13, "13", "取消休眠同意"),
    RefuseInDormancy(14, "14", "休眠拒绝"),
    RefuseOutDormancy(15, "15", "取消休眠拒绝");

    private int    num;
    private String code;
    private String name;

    private OperationType(int num, String code, String name) {
        this.num = num;
        this.code = code;
        this.name = name;
    }
    public static String getByNum(int num) {
        for (OperationType comType : OperationType.values()) {
            if (comType.getNum() == num) {
                return comType.name;
            }
        }
        return null;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
